package cn.pcManage.userManage.controller;

import cn.common.common.model.ServerResponse;
import cn.common.user.model.BaseUserInfo;
import cn.pcManage.userManage.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * Created by Zhang on 2019/1/7.
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    IUserService iUserService;

    @PostMapping(value = "/getUserList")
    public ServerResponse<?> getUserList(@RequestBody BaseUserInfo userInfo){
        return iUserService.getUserList(userInfo);
    }

    @GetMapping(value = "/deleteUser")
    public ServerResponse<?> deleteUser(@RequestParam("userId") Integer userId){
        return iUserService.deleteUser(userId);
    }
}
